//import java.util.*;
abstract class  ss{
}
public class AAA {
    public static void main(String[] args) {
        /*Scanner in=new Scanner(System.in);
        BigInteger n= BigInteger.valueOf(in.nextInt());
        BigInteger b= new BigInteger("1");
        Boolean flag=b.compareTo(n)==-1;//1<n
        for(BigInteger i = BigInteger.valueOf(1); flag; i=i.add(BigInteger.valueOf(1))) {
            b = b.multiply(i);
            flag=i.compareTo(n)==-1;
        }
        System.out.println(b);*/
        /*Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        List<Integer> l=new ArrayList<>();
        for(int i=0;i<n;i++){
            int ne=in.nextInt();
            if(!l.contains(ne))
                l.add(ne);
        }
        int m=in.nextInt();
        List<Integer> f=new ArrayList<>();
        for(int i=0;i<m;i++){
            int ne=in.nextInt();
            if(f.contains(ne))continue;
            else f.add(ne);
        }
        l.sort(Comparator.naturalOrder());
        f.sort(Comparator.naturalOrder());
        if(l.equals(f)){
            System.out.println(1);
        }else{
            System.out.println(0);
        }
        for(Integer i:l)
            System.out.print(i+" ");*/
        /*Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        Map<Integer, Integer> s = new HashMap<>();
        for (int i = 0; i < n; i++) {
            int ne = in.nextInt();
            if (s.containsKey(ne)) {
                s.put(ne, s.get(ne) + 1);
            } else {
                s.put(ne, 1);
            }
        }
        List<Integer> l = new ArrayList<>();
        int ans = 0;
        for (Integer i : s.keySet()) {
            if (s.get(i) > ans) {
                ans = s.get(i);
                l.clear();
                l.add(i);
            } else if (s.get(i) == ans) {
                l.add(i);
            }
        }
        l.sort(Comparator.naturalOrder());
        for (Integer i : l)
            System.out.println(i + " " + ans);

        List<Map.Entry<Integer,Integer>>el=new ArrayList<>(s.entrySet());
        Collections.sort(el, new Comparator<Map.Entry<Integer, Integer>>() {
            @Override
            public int compare(Map.Entry<Integer, Integer> o1, Map.Entry<Integer, Integer> o2) {
                return o1.getValue()-o2.getValue();//升序
            }
        });
        LinkedHashMap<Integer,Integer>lhm=new LinkedHashMap<>();
        for(Map.Entry<Integer,Integer>e:el){
            lhm.put(e.getKey(),e.getValue());//可以直接输出
        }*/
    }
}

interface  a{

}
interface b{}


//class Fatherclass {
//    static {
//        System.out.println("fateer static");
//    }
//
//    public Fatherclass() {
//        System.out.println("“Father class create”");
//    }
//}
//
//class Childclass extends Fatherclass {
////    static {
////        System.out.println("child static");
////    }
//
//    public Childclass() {
//        System.out.println("“Child class create ”");
//    }
//    static String ad;
//    public static void main(String[] args) throws FileNotFoundException {
//        float a = 2;
//        double b = 2f;
//
//        System.out.println(ad);
////        float c = 2d;
////        byte d = 10l;
////        new InputStreamReader(new FileInputStream("file.txt"));
////        new InputStreamReader(new FileReader("file.txt"));
//
////        Fatherclass fc = new Fatherclass();
////        Childclass cc = new Childclass();
////        Childclass cc2 = new Childclass();
//    }
//}
//
//class AAA {
//    static {
//        System.out.println("aaa static");
//    }
//
//    public static void main(String[] args) {
//
//    }
//}

/*public class AAA{
    AAA(){
        System.out.println("default");
    }
    void method(){
        System.out.println("method");
    }
    public static void main(String[] args){
        new AAA().method();
        AAA a=new AAA(){
            void method(){
                System.out.println("method匿名");
            }
        };
    }

//default
//method
//default
//method匿名
}*/

/*//非匿名类
public class J_Test2 extends JFrame{
    public J_Test2(){
        super("Test anonymous inner class");
        Container container=getContentPane();
        container.setLayout(new FlowLayout(FlowLayout.CENTER));
        JButton b=new JButton("Press me");
        container.add(b);
        b.addActionListener(new J_ActionListener());
        setSize(100,80);
        setVisible(true);
    }
    public static void main(String[] args){
        J_Test2 application=new J_Test2();
        application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }}
class J_ActionListener implements ActionListener{
    public void actionPerformed(ActionEvent e){
        System.out.println("The button is pressed");
    }
}*/
/*//J_Test1 匿名类
public class Main extends JFrame {
    public Main() {
        super("Test anonymous inner class");
        Container container = getContentPane();
        container.setLayout(new FlowLayout(FlowLayout.CENTER));
        JButton b = new JButton("Press me");
        container.add(b);
        *//*b.addActionListener(
                new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        System.out.println("The button is pressed");
                    }
                });*//*
        b.addActionListener(
                e -> System.out.println("The button is pressed"));
        setSize(100, 80);
        setVisible(true);
    }

    public static void main(String[] args) {
        Main application = new Main();
        application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}*/


/*
import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        String input = "./input/8约瑟夫环1.asm";
        String output = "./output/8约瑟夫环1.txt";
        removeComments(input, output);
    }

    public static void removeComments(String inputPath, String outPath) throws IOException {
        File inputFile = new File(inputPath);
        File outputFile = new File(outPath);
        BufferedReader reader = null;
        FileWriter writer = null;
        StringBuilder output = new StringBuilder();
        try {
            reader = new BufferedReader(new FileReader(inputFile));
            String line, tmp;
            while ((line = reader.readLine()) != null) {
                tmp = line;
                output.append("#").append(tmp).append('\n');
            }
            reader.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            writer = new FileWriter(outputFile, false);//覆盖
            writer.append(output);
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}*/
